<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			body{
				height: 800px;
				border:1px solid green;
			}
			.father{
				 height: 500px;
				width: 300px;
				background-color:gray;
				position: relative;
				left: 30%;
				top: 30%;
				padding-top: 30px;
			}
			.son{
				height: 100px;
				width: 200px;
				background-color:greenyellow;
				position: absolute;
				left: 35%;
		
			}
		</style>
	</head>
	<body>
		<div class="father">父级</div>
	    <div class="son">子元素div	</div>
		</body>
</html>
